<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入vue的库     -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js">
        Vue.config.productionTip = false   

    </script>

</head>

<body>

    <div class="root">
        <!-- 双向数据绑定v-model -->
      姓:<input type="text" v-model="name"><br>
      名:<input type="text" v-model="namefist"><br>
      全名:<span>{{name}}-{{namefist}}</span>
      
    </div>
    <script type="text/javascript">
        new Vue({
            el: '.root',//el勇于指 定当前实例为那个对象服务
            data: {
                name: '胡',
                namefist: '歌',

            },

        })

        //创建vue实例


    </script>
</body>

</html>